sSOURCES=placement_solver.cpp sa_solver.cpp simulated_annealing.cpp t_tree.cpp test.cpp draw.cpp
HEADERS=$(wildcard *.h)
sOBJECTS=$(sSOURCES:%.cpp=%.o)
FLAG= -O2 -framework GLUT -framework OpenGL -lgmp
TARGET=main.exe

all: $(TARGET) $(LIB)
$(TARGET): $(sOBJECTS) $(HEADERS) $(LIB)
	@echo "Now Generating $(TARGET) ..."
	g++ $(sOBJECTS) -o $(TARGET) $(FLAG)
%.o: %.cpp $(HEADERS)
	@echo "Now Compiling $< ..."
	g++ -c $< -o $@ $(FLAG)
.PHONY: run clean expain
clean:
	-rm $(sOBJECTS) $(TARGET)
run:
	./main.exe
explain:
	@echo "User Sources: $(sSOURCES)"
	@echo "User Objects: $(sOBJECTS)"
	@echo "Target: $(TARGET)"
